package ch.ffhs.radarpp.web;

import ch.ffhs.radarpp.model.Settings;

/**
 * 
 * @author Beda
 *
 */
public class WebManager {

	private WebClient webClient;
	private Settings settings;
	
	public WebManager(WebClient webClient, Settings settings)
	{
		this.webClient = webClient;
		this.settings = settings;
	}
	
	public void executeHTTPRequest(String url)
	{
		
		WebTask task = new WebTask(webClient, new WebParams(url), settings);
		task.execute();	
	}
	
	public void executeHTTPRequest(String url, Object context)
	{
		
		WebTask task = new WebTask(webClient, new WebParams(url, context), settings);
		task.execute();	
	}
	
	public void executeHTTPPostRequest(String url, String requestContent, Object context)
	{
		
		WebTask task = new WebTask(webClient, new WebParams(url, requestContent, context), settings);
		task.execute();
	}
	
}
